package com.zbkj.crmeb;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;

import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;

import lombok.extern.log4j.Log4j2;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@Log4j2
@EnableAsync
@EnableSwagger2
@Configuration
@EnableTransactionManagement
@EnableApolloConfig
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class) //去掉数据源
@ComponentScan(basePackages={"com.utils",
        "com.zbkj.crmeb",
        "com.common",
        "com.aop",
        "com.factory",
        "com.crmeb.core.*"}) //扫描utils包和父包
@MapperScan(basePackages = "com.zbkj.crmeb.*.dao")
@EnableCaching
public class CrmebApplication{
	
    public static void main(String[] args) {
        SpringApplication.run(CrmebApplication.class, args);
        log.info("--------------- crmebApplication Success!! ---------------");
    }
}
